export default {
    namespaced: true,
    actions: {
        login(content, value) {
            console.log('actions  login登录', value)
            content.commit('login', value)
        },
        getInfo(content, value) {
            console.log('actions getInfo查看', value)
            content.commit('getInfo', value)
        },
        getPatientList(content, value) {
            console.log('actions getPatientList查看', value)
            content.commit('getPatientList', value)
        }
    },
    mutations: {
        login(context, value) {
            console.log("mutations  login被调用", value)
            this.state.medicalStaff.loginData = value;
        },
        getInfo(context, value) {
            console.log("mutations getInfo被调用", value)
            this.state.medicalStaff.staffInfomation = value;
        },
        getPatientList(context, value) {
            console.log('mutations getPatientList被调用', value)
            this.state.medicalStaff.patientInfomation = value;
        }
    },
    state: {
        loginData: {
            ret: '',
            roles: '',
            tokenName: '',
            description: '',
            tokenValue: '',
            username: ''
        },
        staffInfomation: {
            id: '',
            username: '',
            password: '',
            name: '',
            sex: '',
            birth: '',
            age: '',
            idno: '',
            tel: '',
            address: '',
            email: '',
        },
        patientInfomation: {
            id: '',
            name: ''
        }
    },
    getters: {

    }
}